package com.lxyk.yygh.hosp.repository;

import com.lxyk.yygh.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 操作mongodb数据库
 */

@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {

    //方法声明需要符合规范
    //判断hospital是否存在
    Hospital getHospitalByHoscode(String hoscode);

    //模糊查询
    List<Hospital> findHospitalByHosnameLike(String hosname);
}
